ActiveReports 9
Create Red Negatives Report

A Red Negatives report shows negative values in red color if those values meet the requirements set in a conditional expression. The following steps demonstrate how to create a report with negative values in red negatives.

These steps assume that you have already added a Page Report/RDL Report template to your project, connected it to a data source and added a DataSet. See Adding an ActiveReport to a Project, Connect to a Data Source and Add a Dataset for more information.

  1. From the Visual Studio toolbox, drag and drop a Table data region onto the design surface and place fields inside the cells of the details row.
  2. In the same Table, select any cell (Textbox) that displays integer values and right click to select Properties.
  3. In the Properties Window that appears, set the following expression in the Color property: =iif(Fields!FieldName.Value < 0, "Red", "Black")
    Note: In the expression above, FieldName refers to field that the textbox contains. For example, if a textbox contains the Rollup field, the expression looks like: =iif(Fields!Rollup.Value < 0, "Red", "Black")
  4. Go to the Preview tab and view the result.

The following image illustrates a report that contains negative values in red:

See Also

 

 


Copyright © 2014 GrapeCity, inc. All rights reserved

Support Forum